package com.gzcc.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/** 
* 描述: webmvc配置 
* @Author: Mr.Zhong 
* @Date: 2018/6/13 
*/ 
@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {
    
    /** 
    * 描述: 访问路径配置 
    * @Author: Mr.Zhong 
    * @Date: 2018/6/13 
    */ 
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/public/image/**").addResourceLocations("file:C:\\data\\file\\image\\");
        registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
        registry.addResourceHandler("swagger-ui.html")
                .addResourceLocations("classpath:/META-INF/resources/");
        registry.addResourceHandler("/ckfinder/**").addResourceLocations("classpath:/ckfinder/");
        registry.addResourceHandler("/upload/**").addResourceLocations("classpath:/upload/");
        super.addResourceHandlers(registry);
    }
}
